package com.oa.gform.client.ui.formatter;

import com.allen_sauer.gwt.log.client.Log;

public class GetValueFormatterFactory {

	public static ValueFormatter<?,?> create(Object beanValue,Object fieldImplementationValue) {
		if (fieldImplementationValue == null) return null;
		if (fieldImplementationValue instanceof String) {
			if (beanValue instanceof String){
				return new FromStringToStringFormatter();
			}
			if (beanValue instanceof Long){
				return new FromStringToLongFormatter();
			}
		}
		Log.error("Manca l'implementazione del formatter");
		return null;
		
	}
}
